<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>xxx</title>
</head>
<body>
<h1>获取服务端更新数据</h1>
<div id="result"></div>
<script>
    const source = new EventSource('http://localhost:8888/sseServer?clientId=77');
    source.addEventListener('slide', e => {
        result.innerText+=e.data;
        console.log(`data: ${e.data}`);
    }, false);
</script>

</body>
</html>